<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Project extends Model
{
    const STATUS_NAME = [
        '进行中', '进行中'
    ];

    protected $table = 'project';

    protected $dateFormat = 'U';

    protected $guarded = [];

    public function jobs()
    {
        return $this->hasMany(Job::class, 'id', 'project_id');
    }

    public function department()
    {
        return $this->belongsTo(Department::class, 'department_id', 'id');
    }
}
